<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fulbito Jueliz</title>
<style type="text/css">
body {
	background-image: url(Proxy_Grass.jpg);
}
</style>
</head>

<body>
<script>
function Validar()
{
	NombreCancha=Comentario.txtNombreCancha.value;
	Comentarios=Comentario.txtComentario.value;
	Calificacion=Comentario.txtCalificacion.value;

		var acumula="";

    if(NombreCancha==""){acumula+="Registre Nombre de la Cancha \n";}
   	if(Comentarios==""){acumula+="Registre un Comentario \n";}
	if(Calificacion==""){acumula+="Registre una Calificacion \n";}
 

	 	if(acumula!="")
	 	{ 
			 alert(acumula); 
		}
	 	else
	 		{
//	 			document.frmLocal.action="<%=request.getContextPath()%>/ServletRegistrarLocal";
//	 			document.frmLocal.method="Post";
//	 			document.frmLocal.accion.Value="GRABAR";
//	 			document.frmLocal.submit();
		location.href='Principal.jsp';
	 		}
}

function ValidaLetras()
{
	txt = window.event.keyCode;
	if(txt!=32 &&  txt<65 || window.event.keyCode>90 && window.event.keyCode<97 || window.event.keyCode>122)
	{
		window.event.keyCode=0;
		}
	}
	function ValidaNumeros(){
	if(window.event.keyCode<48 || window.event.keyCode>57){
	window.event.keyCode=0;}
	}
	function Principal(){
			location.href='Principal.jsp';
	}
</script>
<form id="Comentario" name="Comentario" method="post" action="">
  <table width="883" border="1">
    <tr bgcolor="#FF9933">
      <td colspan="3" align="center"><h1><marquee Behavior= "alternate" scrollamount=7>Comentarios de Canchas de Futbol</marquee></h1></td>
    </tr>
    <tr bgcolor="#FF9933">
      <td colspan="3">&nbsp;</td>
    </tr>
    <tr bgcolor="#FF9933">
      <td>Comentarios</td>
      <td colspan="2"><textarea name="txtComentarioAnterior"  readonly="readonly" id="txtComentario" cols="120" rows="3" ></textarea></td>
    </tr>
    <tr bgcolor="#FF9933">
      <td width="300">Nombre de la Cancha de Futbol</td>
      <td colspan="2"><label for="txtComentario"></label>
        <label for="txtNombreCancha"></label>
        <input name="txtNombreCancha" type="text" id="txtNombreCancha" size="123" maxlength="123" onkeypress="ValidaLetras();" />
      <label for="txtComentarioAnterior"></label></td>
    </tr>
    <tr bgcolor="#FF9933">
      <td>Comentario</td>
      <td colspan="2"><textarea name="txtComentario" id="txtComentario2" cols="120" rows="3" onkeypress="ValidaLetras();"></textarea></td>
    </tr>
    <tr bgcolor="#FF9933">
      <td>Calificacion</td>
      <td colspan="2"><label for="txtCalificacion"></label><select name="cboCalificacion">
      <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> 
      </select></td>
    </tr>
    <tr bgcolor="#FF9933">
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr bgcolor="#FF9933">
      <td align="right"><input type="button" name="btnAceptar" id="btnAceptar" value="Aceptar" onclick="Validar();" style="font-weight: bold; color: white; background-color: green"/></td>
      <td width="371">&nbsp;</td>
      <td width="190"><input type="button" name="btnCancelar" id="btnCancelar" value="Cancelar" onclick="Principal()" style="font-weight: bold; color: white; background-color: green"/></td>
    </tr>
  </table>
</form>
</body>
</html>
